<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body >
	<div id="example-1">
		<blog-post v-for="post in posts" v-bind:key="post.id" v-bind:post="post"></blog-post>
	</div>
	
		
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
<script>
	Vue.component('blog-post', {
		props:['post'],
		template:'<div class="blog-post"><h3>{{post.title}}</h3><div v-html="post.content"></div></div>',
	});
	var vm = new Vue({
		el:'#example-1',
		data:{
			posts:[
					{id:1,title:'My journey with Vue',content:'111'},
					{id:2,title:'Blogging with Vue',content:'222'},
					{id:3,title:'Why Vue is so fun',content:'333'},
				]
		}
	});
	
</script>
</html>



















































